package com.exiassassin.librairies.game;

import java.io.Serializable;
import java.util.Vector;



public abstract class Player implements Serializable{

	protected int id;
	protected String login;
	protected String password;
	//protected byte[] picture;
	protected boolean alive;
	//protected Player[] targetsList;
	//protected Coordinates coordinates;
	
	public int getId() {
		return this.id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getLogin() {
		return this.login;
	}
	public void setLogin(String login) {
		this.login = login;
	}
	public String getPassword() {
		return this.password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	/*public byte[] getPicture() {
		return picture;
	}
	public void setPicture(byte[] picture) {
		this.picture = picture;
	}*/
	
	/*public Player[] getTargetsList() {
		return targetsList;
	}
	public void setTargetsList(Player[] targetsList) {
		this.targetsList = targetsList;
	}
	public Coordinates getCoordinates() {
		return coordinates;
	}
	public void setCoordinates(Coordinates coordinates) {
		this.coordinates = coordinates;
	}*/
	
	public Player() {
	}
/*	public Player(String login, String password, byte[] picture) {
		this.login = login;
		this.password = password;
		//this.picture = picture;
	}
	
	public Player(int id, String login, String password, byte[] picture,
			boolean isAlive, Player[] targetsList, Coordinates coordinates) {
		this.id = id;
		this.login = login;
		this.password = password;
		this.picture = picture;
		this.isAlive = isAlive;
		this.targetsList = targetsList;
		this.coordinates = coordinates;
	}*/
	
	public abstract Player denounceKiller(Player player);
	
	public abstract Player killPlayer(Player player);
	
	public static Player[] convertArrays(Vector<Player> playersVector)
	{
		Player[] player = new Player[playersVector.size()];
		for (int i = 0; i < playersVector.size(); i++)
			player[i] = playersVector.elementAt(i);
		return player;
	}
	public boolean isAlive() {
		return alive;
	}
	public void setAlive(boolean alive) {
		this.alive = alive;
	}
}
